Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

Getting Scene and Node Information

The QuickTime VR Manager provides functions that you can use to get the VR world scene description atom container and to get and set a scene's current node.

QTVRGetVRWorld

You can use the QTVRGetVRWorld function to get the VR world atom container for a movie.

OSErr QTVRGetVRWorld (QTVRInstance qtvr, QTAtomContainer*vrWorld);
qtvr
An instance of a QuickTime VR movie.
vrWorld
On exit, a pointer to an atom container that contains information about the specified movie.
function result
A result code.

DESCRIPTION

The QTVRGetVRWorld function returns, in the vrWorld parameter, a pointer to an atom container that contains general scene information about the QuickTime VR movie specified by the qtvr parameter, as well as a list of all the nodes in that movie. You can use the QuickTime atom functions (introduced in QuickTime version 2.1) to extract atoms from that container.

See the chapter "QuickTime VR Atom Containers" in this book for a description of the format of a VR world atom container and its associated atoms for a QuickTime VR movie.

SPECIAL CONSIDERATIONS

The VR world atom container returned by QTVRGetVRWorld is a copy of the atom container maintained internally by the QuickTime VR Manager. You should dispose of the VR world atom container (by calling the QuickTime function QTDisposeAtomContainer ) when you're finished using it.

QTVRGoToNodeID

You can use the QTVRGoToNodeID function to set the current node of a movie.

OSErr QTVRGoToNodeID (QTVRInstance qtvr, UInt32nodeID);
qtvr
An instance of a QuickTime VR movie.
nodeID
The ID of the node you want to be the current node.
function result
A result code.

DESCRIPTION

The QTVRGoToNodeID function sets the current node in the QuickTime VR movie specified by the qtvr parameter to be the node that has the ID specified by the nodeID parameter.

The QuickTime VR Manager defines several constants for specific nodes. For example, you can set nodeID to kQTVRDefaultNode to set the current node to the default node in the scene. Similarly, you can set nodeID to kQTVRPreviousNode to return to the previous node. See "Node IDs" for a description of the available node ID constants.

SPECIAL CONSIDERATIONS

Setting the current node also sets the pan, tilt, and field of view of the new current node to their default values. As a result, if you wish to set non-default angles, you should call QTVRGoToNodeID before you call QTVRSetPanAngle , QTVRSetTiltAngle , or QTVRSetFieldOfView .

SEE ALSO

Use QTVRGetCurrentNodeID (next) to get the current node ID.

QTVRGetCurrentNodeID

You can use the QTVRGetCurrentNodeID function to get the current node of a movie.

UInt32 QTVRGetCurrentNodeID (QTVRInstance qtvr);
qtvr
An instance of a QuickTime VR movie.
function result
The ID of the current node of the specified movie.

DESCRIPTION

The QTVRGetCurrentNodeID function returns, as its function result, the ID of the current node of the QuickTime VR movie specified by the qtvr parameter.

SEE ALSO

Use QTVRGoToNodeID to set the current node ID.

QTVRGetNodeType

You can use the QTVRGetNodeType function to get the type of a movie node.

OSType QTVRGetNodeType (QTVRInstance qtvr, UInt32nodeID);
qtvr
An instance of a QuickTime VR movie.
nodeID
A node ID. Pass kQTVRCurrentNode for the current node.
function result
The type of the specified node.

DESCRIPTION

The QTVRGetNodeType function returns, as its function result, the type of the node specified by the nodeID parameter in the QuickTime VR movie specified by the qtvr parameter. See "Node Types" for a description of the values that QTVRGetNodeType can return.

QTVRGetNodeInfo

You can use the QTVRGetNodeInfo function to get the node information atom container that describes a node and all the hot spots in the node.

OSErr QTVRGetNodeInfo (
                     QTVRInstance qtvr,
                     UInt32nodeID,
                     QTAtomContainer*nodeInfo);
qtvr
An instance of a QuickTime VR movie.
nodeID
A node ID. Set this parameter to kQTVRCurrentNode to receive information about the current node.
nodeInfo
On exit, a pointer to an atom container that contains information about the specified node.
function result
A result code.

DESCRIPTION

The QTVRGetNodeInfo function returns, in the nodeInfo parameter, a pointer to an atom container that contains information about the node specified by the nodeID parameter in the movie specified by the qtvr parameter. The atom container includes information about all the hot spots contained in that node. You can use the QuickTime atom functions (introduced in QuickTime version 2.1) to extract atoms from that container. You can also use those functions to access the hot spot atom list. All hot spot atoms are contained in the hot spot parent atom.

See the chapter "QuickTime VR Atom Containers" in this book for a description of the format of a node information atom container and its associated atoms for a node.

SPECIAL CONSIDERATIONS

The node information atom container returned by QTVRGetNodeInfo is a copy of the atom container maintained internally by the QuickTime VR Manager. You should dispose of the node information atom container (by calling the QuickTime function QTDisposeAtomContainer ) when you're finished using it.

SEE ALSO

Listing 4-1 in the chapter "QuickTime VR Atom Containers" illustrates how to call the QTVRGetNodeInfo function.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |